package com.eduadmin.service;

import com.eduadmin.entity.PassInform;
import com.eduadmin.mapper.PassInformMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PassInformServiceImpl implements IPassInformService{
    private final PassInformMapper passInformMapper;
    @Autowired
    public PassInformServiceImpl(PassInformMapper passInformMapper) {this.passInformMapper = passInformMapper;}
    @Override
    // 批量插入上线情况对象列表
    public int batchInsert(List<PassInform> passInformList){
        passInformMapper.batchInsert(passInformList);
        return 1;
    }
    // 根据条件（学期&&年级&&考试&&分类）查找所有的上线情况记录，返回对象列表
    public List<PassInform> getAllPassInformByParams(Map<String,Object> paraMap){
        return passInformMapper.getAllPassInformByParams(paraMap);
    }
    // 根据条件（学期&&年级&&考试&&分类）删除所有的上线情况记录，返回1
    public int deleteByParams(Map<String,Object> paraMap){
        passInformMapper.deleteByParams(paraMap);
        return 1;
    }
    // 查询满足条件的记录条数
    public int getAllPassInformNumberByParams(Map<String,Object> paraMap){
        return passInformMapper.getAllPassInformNumberByParams(paraMap);
    }
}
